#include<bits/stdc++.h>
#define ll long long
#define inf 1000000007
using namespace std;
int n,a[100005],t[100005];
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);//orz
    cin >> n;
    for(int i = 1;i <= n;i++)
    {
        cin >> a[i];
        t[a[i]]++;
    }
    sort(a+1,a+n+1);
    int ans = 0,psum = t[a[1]];
    for(int i = 2;i <= n;i++)
    {
        while(a[i] == a[i - 1])i++;
        ans += min(t[a[i]],psum);
        psum = max(0,psum - t[a[i]]) + t[a[i]];
    }
    cout << n - ans << endl ;
    return 0;
}//What can I say.